<template>
	<view>
		<view class="content" v-for="(t, i) in TopicList" :key="t.id">
			<view class="item">
				<view class="item-image">
					<image :src="t.cover" mode="widthFix"></image>
					<text># 专题</text>
				</view>
				<view class="text">{{t.title}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		http
	} from '../../untils/http.js'
	
	const url = 'banner/list/4'
	
	export default {
		name:"SpecialTopic",
		data() {
			return {
				TopicList: []
			};
		},
		created() {
			http(url).then(res => {
				// console.log(res);
				this.TopicList = res.data
				console.log(this.TopicList);
			})
		}
	}
</script>

<style lang="scss">
	* {
		box-sizing: border-box;
	}
	
	.content {
		padding: 10px;
		margin-bottom: 15px;
		width: 750rpx;
		// border: 1px solid black;
		
		.item {
			// border: 1px solid black;
			border-radius: 10px;
			background-color: #f5f5f5;
			box-shadow: 2px 2px 10px 1px #e2e2e2; 
		}
		
		.item-image {
			position: relative;
			
			text {
				padding: 10px;
				position: absolute;
				bottom: 0;
				left: 0;
				color: #fff;
				font-size: 12px;
			}
		}
		
		image {
			width: 100%;
			border-top-left-radius: 5px;
			border-top-right-radius: 5px;
		}
		
		.text {
			padding: 8px 10px;
			font-weight: 700;
			font-size: 14px;
			border-radius: 10px;
		}
	}
</style>